package com.bkgy.modularbx.processrule.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 工艺规则库表
 * @TableName TB_DSJ_PROCESS_RULE_LIBRARY
 */
@Schema(description = "工艺规则库实体")
@TableName(value ="TB_DSJ_PROCESS_RULE_LIBRARY")
public class ProcessRuleLibrary {
    /**
     * 工艺规则库变量名
     */
    @Schema(description = "工艺规则库变量名", required = true)
    @TableId
    private String processRuleVariable;

    /**
     * 产线
     */
    @Schema(description = "产线")
    private String productionLine;

    /**
     * 区域代码
     */
    @Schema(description = "区域代码")
    private String areaCode;

    /**
     * 设备代码
     */
    @Schema(description = "设备代码")
    private String deviceCode;

    /**
     * 变量描述
     */
    @Schema(description = "变量描述")
    private String variableDescription;

    /**
     * 阈值
     */
    @Schema(description = "阈值")
    private BigDecimal thresholdValue;

    /**
     * 阈值单位
     */
    @Schema(description = "阈值单位")
    private String thresholdUnit;

    /**
     * 报警等级
     */
    @Schema(description = "报警等级")
    private Integer warningGrade;

    /**
     * 监控周期
     */
    @Schema(description = "监控周期")
    private String monitoringCycle;

    /**
     * 数据类型，int，float，double
     */
    @Schema(description = "数据类型，int，float，double")
    private String datatype;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private Date toc;

    /**
     * 修改时间
     */
    @Schema(description = "修改时间")
    private Date tom;

    /**
     * 工艺规则库变量名
     */
    public String getProcessRuleVariable() {
        return processRuleVariable;
    }

    /**
     * 工艺规则库变量名
     */
    public void setProcessRuleVariable(String processRuleVariable) {
        this.processRuleVariable = processRuleVariable;
    }

    /**
     * 产线
     */
    public String getProductionLine() {
        return productionLine;
    }

    /**
     * 产线
     */
    public void setProductionLine(String productionLine) {
        this.productionLine = productionLine;
    }

    /**
     * 区域代码
     */
    public String getAreaCode() {
        return areaCode;
    }

    /**
     * 区域代码
     */
    public void setAreaCode(String areaCode) {
        this.areaCode = areaCode;
    }

    /**
     * 设备代码
     */
    public String getDeviceCode() {
        return deviceCode;
    }

    /**
     * 设备代码
     */
    public void setDeviceCode(String deviceCode) {
        this.deviceCode = deviceCode;
    }

    /**
     * 变量描述
     */
    public String getVariableDescription() {
        return variableDescription;
    }

    /**
     * 变量描述
     */
    public void setVariableDescription(String variableDescription) {
        this.variableDescription = variableDescription;
    }

    /**
     * 阈值
     */
    public BigDecimal getThresholdValue() {
        return thresholdValue;
    }

    /**
     * 阈值
     */
    public void setThresholdValue(BigDecimal thresholdValue) {
        this.thresholdValue = thresholdValue;
    }

    /**
     * 阈值单位
     */
    public String getThresholdUnit() {
        return thresholdUnit;
    }

    /**
     * 阈值单位
     */
    public void setThresholdUnit(String thresholdUnit) {
        this.thresholdUnit = thresholdUnit;
    }

    /**
     * 报警等级
     */
    public Integer getWarningGrade() {
        return warningGrade;
    }

    /**
     * 报警等级
     */
    public void setWarningGrade(Integer warningGrade) {
        this.warningGrade = warningGrade;
    }

    /**
     * 监控周期
     */
    public String getMonitoringCycle() {
        return monitoringCycle;
    }

    /**
     * 监控周期
     */
    public void setMonitoringCycle(String monitoringCycle) {
        this.monitoringCycle = monitoringCycle;
    }

    /**
     * 数据类型，int，float，double
     */
    public String getDatatype() {
        return datatype;
    }

    /**
     * 数据类型，int，float，double
     */
    public void setDatatype(String datatype) {
        this.datatype = datatype;
    }

    /**
     * 创建时间
     */
    public Date getToc() {
        return toc;
    }

    /**
     * 创建时间
     */
    public void setToc(Date toc) {
        this.toc = toc;
    }

    /**
     * 修改时间
     */
    public Date getTom() {
        return tom;
    }

    /**
     * 修改时间
     */
    public void setTom(Date tom) {
        this.tom = tom;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ProcessRuleLibrary other = (ProcessRuleLibrary) that;
        return (this.getProcessRuleVariable() == null ? other.getProcessRuleVariable() == null : this.getProcessRuleVariable().equals(other.getProcessRuleVariable()))
            && (this.getProductionLine() == null ? other.getProductionLine() == null : this.getProductionLine().equals(other.getProductionLine()))
            && (this.getAreaCode() == null ? other.getAreaCode() == null : this.getAreaCode().equals(other.getAreaCode()))
            && (this.getDeviceCode() == null ? other.getDeviceCode() == null : this.getDeviceCode().equals(other.getDeviceCode()))
            && (this.getVariableDescription() == null ? other.getVariableDescription() == null : this.getVariableDescription().equals(other.getVariableDescription()))
            && (this.getThresholdValue() == null ? other.getThresholdValue() == null : this.getThresholdValue().equals(other.getThresholdValue()))
            && (this.getThresholdUnit() == null ? other.getThresholdUnit() == null : this.getThresholdUnit().equals(other.getThresholdUnit()))
            && (this.getWarningGrade() == null ? other.getWarningGrade() == null : this.getWarningGrade().equals(other.getWarningGrade()))
            && (this.getMonitoringCycle() == null ? other.getMonitoringCycle() == null : this.getMonitoringCycle().equals(other.getMonitoringCycle()))
            && (this.getDatatype() == null ? other.getDatatype() == null : this.getDatatype().equals(other.getDatatype()))
            && (this.getToc() == null ? other.getToc() == null : this.getToc().equals(other.getToc()))
            && (this.getTom() == null ? other.getTom() == null : this.getTom().equals(other.getTom()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getProcessRuleVariable() == null) ? 0 : getProcessRuleVariable().hashCode());
        result = prime * result + ((getProductionLine() == null) ? 0 : getProductionLine().hashCode());
        result = prime * result + ((getAreaCode() == null) ? 0 : getAreaCode().hashCode());
        result = prime * result + ((getDeviceCode() == null) ? 0 : getDeviceCode().hashCode());
        result = prime * result + ((getVariableDescription() == null) ? 0 : getVariableDescription().hashCode());
        result = prime * result + ((getThresholdValue() == null) ? 0 : getThresholdValue().hashCode());
        result = prime * result + ((getThresholdUnit() == null) ? 0 : getThresholdUnit().hashCode());
        result = prime * result + ((getWarningGrade() == null) ? 0 : getWarningGrade().hashCode());
        result = prime * result + ((getMonitoringCycle() == null) ? 0 : getMonitoringCycle().hashCode());
        result = prime * result + ((getDatatype() == null) ? 0 : getDatatype().hashCode());
        result = prime * result + ((getToc() == null) ? 0 : getToc().hashCode());
        result = prime * result + ((getTom() == null) ? 0 : getTom().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", processRuleVariable=").append(processRuleVariable);
        sb.append(", productionLine=").append(productionLine);
        sb.append(", areaCode=").append(areaCode);
        sb.append(", deviceCode=").append(deviceCode);
        sb.append(", variableDescription=").append(variableDescription);
        sb.append(", thresholdValue=").append(thresholdValue);
        sb.append(", thresholdUnit=").append(thresholdUnit);
        sb.append(", warningGrade=").append(warningGrade);
        sb.append(", monitoringCycle=").append(monitoringCycle);
        sb.append(", datatype=").append(datatype);
        sb.append(", toc=").append(toc);
        sb.append(", tom=").append(tom);
        sb.append("]");
        return sb.toString();
    }
}